package io.github.uicdb.et.item.curios;

import com.google.common.collect.Multimap;
import io.github.uicdb.et.ModElements;
import io.github.uicdb.et.ModTags;
import net.minecraft.core.Holder;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import top.theillusivec4.curios.api.SlotContext;

import java.util.List;

public class ShadowNecklaceItem extends CurioItem {
    public ShadowNecklaceItem(Properties properties) {
        super(properties, 0);
    }

    @Override
    public void appendDefaultAttribute(Multimap<Holder<Attribute>, AttributeModifier> map, SlotContext slotContext, ResourceLocation id, ItemStack stack) {
        map.put(ModElements.YIN.getElemental().getIncreasing(), getSlotModifier(0,slotContext,40, AttributeModifier.Operation.ADD_VALUE));
    }

    @Override
    public void addAdditionTooltip(List<Component> tooltips, ItemStack stack) {
        tooltips.add(translate("shadow_necklace"));
    }

    @Override
    public TagKey<Item> getEquippedTag() {
        return ModTags.PR_CRYSTEL;
    }
}
